Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 14 - Shader Objects / Shader Objects Reference
Constants


Boundary-Handling Methods

You use a boundary-handling method specifier to indicate how you want a shader to handle uv values that are outside the valid range (namely, 0 to 1). For example, you pass one of these constants to the Q3Shader_SetUBoundary function to indicate how to handle values in the u parametric direction that lie outside the valid range.

Note
For a fuller description of boundary-handling methods, see "Handling uv Values Outside the Valid Range," beginning on page 14-15.
typedef enum TQ3ShaderUVBoundary {
   kQ3ShaderUVBoundaryWrap,
   kQ3ShaderUVBoundaryClamp
} TQ3ShaderUVBoundary;
Constant descriptions

kQ3ShaderUVBoundaryWrap
Values outside the valid range are to be wrapped. To wrap a shader effect is to replicate the entire effect across the mapped area. For example, for a texture shader, wrapping causes the entire image to be replicated across the surface onto which the texture is mapped.
kQ3ShaderUVBoundaryClamp
Values outside the valid range are to be clamped. To clamp a shader effect is to replicate the boundaries of the effect across the portion of the mapped area that lies outside the valid range. For example, for a texture shader, clamping causes boundaries of the image to be smeared across the portion of the surface onto which the texture is mapped that lies outside the valid range.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996